<?php
/**
 * 此文件用来定义Redis的键 并返回
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/11
 * Time: 15:18
 */

namespace App\Http\Controllers;

class PCHController extends Controller
{
    /**
     * 返回用户信息缓存在redis的键名
     * @param int $uid
     * @return string
     */
    public static function getUserInfoKeyByUID(int $uid):string
    {
        if (empty($uid)){
           return false;
        }
        $key = 'User_HSET::'.$uid;
        return $key;
    }

    /**
     * 分佣比例
     * @return string
     */
    public static function getRateListKey()
    {
        $key = 'Rate_HSET';
        return $key;
    }
}